program ej14; { Ejemplo 14 de CpcPaChi }
var
  i, j, k: byte;  

procedure inicializa;
begin
  cpcMode(1);
  paper(0);
end;

procedure lineaHorizontal; 

begin
  for i := 1 to 10 do
    writeChar('*') ;     
end;
  
(* Vamos a dibujar un cuadrado *) 

begin

  inicializa;
  locate(10,3);
  pen(1);
  lineaHorizontal;
  
  pen(2);
  for j := 4 to 7 do
    begin
    locate(10,j);
    writeChar('*');
    for k := 1 to 8 do
      writeChar(' ');
    writeChar('*');
    end;
    
  locate(10,8);
  pen(3);  
  lineaHorizontal;
  
  locate(10,10);
  pen(1);
end.

